
#include <p18f458.h>
#include <delays.h>

void main(void) {
    CANCON=6;
    CANSTAT=0;
    RXB1CON=45;
    RXB1SIDH=0;
    RXB1SIDL=8;
    BRGCON1=0;
    BRGCON2=10;
    BRGCON3=0;
    TRISA=7;

    if(RXB1D1==3)
    {
        PORTA=3;
    }
    if(RXB1D2==5)
    {
        PORTA=5;
    }
     if(RXB1D3==6)
    {
        PORTA=6;
    }
    return;
}